home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / vibrant / mappingP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-05  |  3.8 KB  |  112 lines  |  [TEXT/R*ch]

  1. /*   mappingP.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE
  5. *            National Center for Biotechnology Information (NCBI)
  6. *
  7. *  This software/database is a "United States Government Work" under the
  8. *  terms of the United States Copyright Act.  It was written as part of
  9. *  the author's official duties as a United States Government employee and
  10. *  thus cannot be copyrighted.  This software/database is freely available
  11. *  to the public for use. The National Library of Medicine and the U.S.
  12. *  Government do not place any restriction on its use or reproduction.
  13. *  We would, however, appreciate having the NCBI and the author cited in
  14. *  any work or product based on this material
  15. *
  16. *  Although all reasonable efforts have been taken to ensure the accuracy
  17. *  and reliability of the software and data, the NLM and the U.S.
  18. *  Government do not and cannot warrant the performance or results that
  19. *  may be obtained by using this software or data. The NLM and the U.S.
  20. *  Government disclaim all warranties, express or implied, including
  21. *  warranties of performance, merchantability or fitness for any particular
  22. *  purpose.
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  mappingP.h
  27. *
  28. * Author:  Jonathan Kans, Jill Shermer
  29. *
  30. * Version Creation Date:   1/19/93
  31. *
  32. * $Revision: 1.6 $
  33. *
  34. * File Description: 
  35. *
  36. * Modifications:  
  37. * --------------------------------------------------------------------------
  38. * Date     Name        Description of modification
  39. * -------  ----------  -----------------------------------------------------
  40. *
  41. *
  42. * ==========================================================================
  43. */
  44.  
  45. #ifndef _MAPPINGP_
  46. #define _MAPPINGP_
  47.  
  48. #ifndef _VIBRANT_
  49. #include <vibrant.h>
  50. #endif
  51.  
  52. #ifndef _PICTURE_
  53. #include <picture.h>
  54. #endif
  55.  
  56. #ifndef _PICTUREP_
  57. #include <pictureP.h>
  58. #endif
  59.  
  60. /*****************************************************************************
  61. *
  62. *   STRUCTURE TYPEDEFS
  63. *
  64. *****************************************************************************/
  65.  
  66. typedef struct Nlm_scaleinfo {
  67.   Nlm_BoxInfo  world;
  68.   Nlm_RecT     view;
  69.   Nlm_BoxInfo  port;
  70.   Nlm_Int4     scaleX;
  71.   Nlm_Int4     scaleY;
  72.   Nlm_Int2     scrollX;
  73.   Nlm_Int2     scrollY;
  74.   Nlm_Boolean  force;
  75. } Nlm_ScaleInfo, PNTR Nlm_ScalePtr;
  76.  
  77. /*****************************************************************************
  78. *
  79. *   FUNCTION PROTOTYPES
  80. *
  81. *****************************************************************************/
  82.  
  83. extern Nlm_Boolean Nlm_BoxInViewport        PROTO((Nlm_RectPtr rct, Nlm_BoxPtr box, Nlm_RectPtr mrg, Nlm_ScaleInfo *scale));
  84. extern Nlm_Boolean Nlm_LineInViewport       PROTO((Nlm_PointPtr pt1, Nlm_PointPtr pt2, Nlm_PntPtr pnt1, Nlm_PntPtr pnt2, Nlm_RectPtr mrg, Nlm_ScaleInfo *scale));
  85. extern Nlm_Boolean Nlm_PntInViewport        PROTO((Nlm_PointPtr pt, Nlm_PntPtr pnt, Nlm_RectPtr mrg, Nlm_ScaleInfo *scale));
  86.  
  87. extern void        Nlm_MapWorldPointToPixel PROTO((Nlm_PointPtr pt, Nlm_PntPtr pnt, Nlm_ScaleInfo *scale));
  88. extern void        Nlm_MapPixelPointToWorld PROTO((Nlm_PntPtr pnt, Nlm_PointPtr pt, Nlm_ScaleInfo *scale));
  89.  
  90. extern Nlm_Boolean Nlm_PntInBox             PROTO((Nlm_BoxPtr box, Nlm_PntPtr pnt, Nlm_RectPtr mrg, Nlm_ScaleInfo *scale));
  91. extern void        Nlm_MapToRect            PROTO((Nlm_RectPtr r, Nlm_PoinT pt, Nlm_Int2 width, Nlm_Int2 height, Nlm_Int2 offset, Nlm_Uint2 align));
  92.  
  93. #define ScaleInfo Nlm_ScaleInfo
  94. #define ScalePtr Nlm_ScalePtr
  95. #define BoxInViewport Nlm_BoxInViewport
  96. #define LineInViewport Nlm_LineInViewport
  97. #define PntInViewport Nlm_PntInViewport
  98. #define MapWorldPointToPixel Nlm_MapWorldPointToPixel
  99. #define MapPixelPointToWorld Nlm_MapPixelPointToWorld
  100. #define PntInBox Nlm_PntInBox
  101. #define MapToRect Nlm_MapToRect
  102.  
  103. #ifdef __cplusplus
  104. extern "C" {
  105. #endif
  106.  
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110.  
  111. #endif
  112.